<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('公司信息-编辑')" />
<!-- 	<th:block th:include="include :: select2-css" /> -->
</head>
<style>
.layui-form-label{width:110px;}
.layui-input-block{margin-left:140px;}
.layui-form-radio{padding-right:0}
</style>
<body>
<form class="layui-form post_form" lay-filter="fform" style="padding:10px 60px 10px 10px;">
	<div class="layui-form-item" th:each="field : ${fieldsList}">
	 	<label class="layui-form-label">
	     	<font class="f_red" th:if="${#bools.isTrue(field?.fieldFrontRequired)}">*</font>
	     	<span th:text="${field.fieldName}"></span>
     	</label>
		<div class="layui-input-block">
	    	<input th:if="${field.fieldFrontType} eq 't_text'" type="text" th:ftitle="${field.fieldName}" th:name="${field?.fields}" th:id="${field?.fields}" th:value="${field?.fieldContent}" autocomplete="off" th:onblur="${field?.fieldFrontRequired==true}? 'inputOnBlur(this)' : ''" th:readonly="${field?.fieldFrontEdit==false}? 'true' : 'false'" class="layui-input">
	    	<input th:if="${field.fieldFrontType} eq 't_checkbox'" type="checkbox" th:ftitle="${field.fieldName}" th:checked="${field?.fieldContent == false or field?.fieldContent == null}" value="0" th:name="${field?.fields}" th:id="${field?.fields}" 
	    	lay-skin="switch" th:lay-text="${field?.fields == 'bDeleted'} ? '启用|禁用' : '是|否'">
	    	<input th:if="${field.fieldFrontType} eq 't_buttontext'" type="text" th:ftitle="${field.fieldName}" class="layui-input" th:name="${field?.fields}" th:id="${field?.fields}" th:value="${field?.fieldContent}" style="height:38px;padding:0 17px 0 10px" readonly/>
			<i th:if="${field.fieldFrontType} eq 't_buttontext'" class="layui-icon layui-icon-more getMore" getType="vUsers" style="position: absolute;top:7px;right: 8px;"></i>
		</div>
	</div>
	<input type="hidden" th:each="fieldhide : ${fieldsHiddenList}" th:name="${fieldhide?.fields}" th:id="${fieldhide?.fields}" th:value="${fieldhide?.fieldContent}">
</form>
<th:block th:include="include :: footer" />
<script type="text/javascript">
layui.use(['table','form','layer','jquery'], function () {
	var $ = layui.$,layer = layui.layer,form = layui.form,table = layui.table,postStr = [];
	/*
    *url:保存路径
    *title:弹出层标题
    *type:1新增管理员；2新增员工
    */
    $(".getMore").click(function(){
        $.modal.open('选择公司管理者','/system/user/userselect?pagetype=radio','600','450',function(index){
            var res = window["layui-layer-iframe" + index].callbackdata();
            if(!!res){
            	$("#vMuser").val(res.userId);
           	 	layer.closeAll();
            }else{
            	layer.msg("请选择人员！", {icon:7});
            }
        })
    })
})
</script>
</body>
</html>
